package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;

/**
 * 商品sku对象 sys_biz_goods_sku
 *
 * @author lixinchen
 * @date 2024-01-05
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_goods_sku")
public class SysBizGoodsSku extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private Long goodsId;


    /**
     * 商品名称
     */
    @TableField(exist = false)
    private String goodsName;

    /**
     * SKU图片
     */
    @Excel(name = "SKU图片")
    private String pic;

    /**
     * erp编码(对接第三方)
     */
    @Excel(name = "erp编码(对接第三方)")
    private String erpProductCode;


    /**
     * erp是否是最小单位(0:否,1.是)
     */
    @Excel(name = "erp是否是最小单位(0:否,1.是)")
    private Integer erpSmallUnit;

    /**
     * SKU编码
     */
    @Excel(name = "SKU编码")
    private String skuCode;

    /**
     * 标签（标签（1限时抢购 2新品促销 3热销商品）
     */
    @Excel(name = "标签（标签（1限时抢购 2新品促销 3热销商品）")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer tag;
    /**
     * 长单位
     */
    private String longUnit;
    /**
     * 长单位数量
     */
    private Integer longUnitNumber;
    /**
     * 最小单位数量
     */
    private Integer unitNumber;
    /**
     * 限购数量
     */
    private Integer limitNumber;
    /**
     * 最小单位
     */
    private String unit;

    /**
     * 规格标识
     */
    @Excel(name = "规格标识")
    private String specsKey;

    /**
     * 规格详情
     */
    @Excel(name = "规格详情")
    private String specsData;

    /**
     * 会员销售价（元）
     */
    @Excel(name = "会员销售价", readConverterExp = "元=")
    private BigDecimal memberSalesPrice;

    /**
     * 会员市场价（元）
     */
    @Excel(name = "会员市场价", readConverterExp = "元=")
    private BigDecimal memberMarketPrice;

    /**
     * 非会员销售价（元）
     */
    @Excel(name = "非会员销售价", readConverterExp = "元=")
    private BigDecimal noMemberSalesPrice;

    /**
     * 非会员市场价（元）
     */
    @Excel(name = "非会员市场价", readConverterExp = "元=")
    private BigDecimal noMemberMarketPrice;

    /**
     * 重量（g）
     */
    @Excel(name = "重量", readConverterExp = "g=")
    private Long weight;

    /**
     * 体积（m3）
     */
    @Excel(name = "体积", readConverterExp = "m=3")
    private Long volume;

    /**
     * 库存
     */
    @Excel(name = "库存")
    private Long stock;

    /**
     * 已冻结库存
     */
    @Excel(name = "已冻结库存")
    private Long frozenStockCount;

    /**
     * 状态 （禁用启用）
     */
    @Excel(name = "状态 ", readConverterExp = "禁用 启用")
    private Integer status;

    /**
     * 销量
     */
    @Excel(name = "销量")
    private Long sales;


    /**
     * 实际销量
     */
    @Excel(name = "实际销量")
    @TableField(exist = false)
    private Long salesCount;


    /**
     * 库存总量
     */
    @Excel(name = "库存")
    @TableField(exist = false)
    private Long stockCount;

    /**
     * vip1 价格
     */
    private BigDecimal vip1Price;
    /**
     * vip2 价格
     */
    private BigDecimal vip2Price;
    /**
     * vip3 价格
     */
    private BigDecimal vip3Price;
    /**
     * vip4 价格
     */
    private BigDecimal vip4Price;
    /**
     * vip5 价格
     */
    private BigDecimal vip5Price;
    /**
     * 活动价格
     */
    private BigDecimal activityPrice;


    /**
     * sku名称
     */
    private String skuName;

    /**
     * 属性标签(多个逗号隔开)
     */
    @TableField(exist = false)
    private String propTags;


    @TableField(exist = false)
    private Long categoryTwoId;


    /*推荐商品排序用*/
    @TableField(exist = false)
    private Long recOrderNum;

    /*推荐商品ID*/
    @TableField(exist = false)
    private Long recId;

}
